﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VideoNetApplication.Common.Dao;
using VideoNetApplication.Common.Web;

namespace VideoNetApplication.Common.Service
{
 public   class CommentService
    {
     CommentDao  dao=new CommentDao();

      public  int AddComment(V_VideoComment comment)
      {
          return dao.AddComment(comment);

      }

      public int GetMessageCnt(int courseId)
      {
          return dao.GetMessageCnt(courseId);
      }

      public List<V_VideoComment> GroupMessage(MessageArguments args)
      {
          int startRowIndex = (args.PageIndex ) * args.PageSize;

          return GetMessageList( args.ItemID, startRowIndex, args.PageSize);
      }


      public List<V_VideoComment> GetMessageList(int courseId, int startRowIndex, int maximumRows)
      {
          return dao.GetMessageList(courseId, startRowIndex, maximumRows);
      }
    }
}
